-- 如果当前键不存在或者令牌桶没有令牌，返回-1
local count_token_bucket = redis.call('get', KEYS[1])
if(count_token_bucket ==  nil or tonumber(count_token_bucket) <= 0) then
    return -1
end

redis.call('set',KEYS[1],count_token_bucket-1)
return 0